export function deepCopy(obj){
  if(obj === null || typeof obj !== 'object') return obj;
  if(obj instanceof Date) return new Date(obj);
  if(obj instanceof RegExp) return new RegExp(obj);
  const newObj = Array.isArray(obj) ? [] : {};
  for(const key in obj){
    if(obj.hasOwnProperty(key)){
      newObj[key] = deepCopy(obj[key]);
    }
  }
  return newObj;
}
